package project.menu.ordermenu.listallorders;

import project.menu.IMenu;
import project.menu.IMenuItem;
import project.work.Navigator;
import controllers.IAutoservice;

public class AllOrdersByBeginingDate implements IMenuItem {

	private String name = " Sort By Begining Date";
	private final Integer id = 2;
	private static IMenu submenu;
	private Navigator n;
	
	public AllOrdersByBeginingDate(){
		n=Navigator.getInstance();
	}
	
	public Integer getId() {
		return id;
	}
	
	
	public String getNameItem() {
		return name;
	}

	
	
	public static void setMenu(IMenu menu) {
		submenu = menu;
	}

	
	public void action(IAutoservice aut) {
		aut.SortOrderByBeginningDate();
	
		n.drawMenu(submenu);

	}
}
